1. Field of the Invention
The present invention relates generally to computer graphics and imaging, and more particularly, to a system, method, and software for high-speed rendering of text to a display screen or other medium.
2. Related Art
Text is traditionally known as the written representation of spoken language. Text comprises a set of symbols that, when displayed in a meaningful order, conveys information. A writing system is generally a method of depicting words visually. A writing system can serve one or several languages. For example, the Roman writing system serves many languages, including French, Italian, and Spanish.
A writing system's alphabet, numbers, punctuation, and other writing marks consist of characters. A character refers to a symbolic representation of an element of a writing system. Simple examples of a character include the lowercase letter “a” and the number “1.” Some software programs provide multilingual support and are capable of displaying characters in other languages such as Korean, Chinese, and Japanese, etc.
A glyph refers to the concrete, visual representation of a character. A glyph may represent one character (e.g., the lowercase letter “a”). A glyph may also represent more than one character (e.g., theft ligature). A glyph may also represent part of a character (e.g., the dot in the lowercase letter “i”). A glyph may also represent a nonprinting character (e.g., the space character). A font is a collection of glyphs of similar design that usually have some element of design consistency, such as the shape of the ovals (known as the counter), the design of the stem, stroke thickness, or the use of serifs.
In text rendering, a request is received to render glyphs, advances, font, and Gstate. An advance refers to the white space to the next glyph, in the X and Y directions. Gstate refers to the state of various style attributes, such as color, clip, and compositing mode.
Rendering text using a GPU (graphics processor unit) includes the steps of laying out lines using advances, glyphs, and font; determining which glyph bitmaps are needed; generating bitmaps; uploading the bitmaps to the GPU; generating a series of textured rectangles to draw glyphs; and instructing the GPU what to draw.
Programmable GPUs run programs that are generally called fragment programs. The name “fragment” program derives from the fact that the unit of data being operated upon is generally a pixel, i.e., a fragment of an image. The GPUs can run a fragment program on several pixels simultaneously to create a result, which is generally referred to by the name of the buffer in which it resides. GPUs use data input generally called textures, which are analogous to a collection of pixels.
Many different types of computer programs, such as desktop publishing programs, word processing programs, graphic design programs, and web page authoring programs, provide the capability for users to display text in a variety of ways. Text rendering is one of the most important facets of operating system user interface performance. In addition, with the advancement in rendering techniques, including LCD (liquid crystal display) text rendering, the process has become more and more intensive.